package com.stu.factorybean;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAspect implements MethodInterceptor {
	public void before() {
		System.out.println("头部");
	}
	public void after() {
		System.out.println("尾部");
	}

	@Override
	public Object invoke(MethodInvocation invocation) throws Throwable {
		before();
		Object object =invocation.proceed();
		after();
		return object;
	}

}
